import request from "@/libs/request";

const basePath = '/appcloud-builder-api' ;

export const apiUrls = {
	getHistroyTemplate : basePath + '/template/getHistroyTemplate',
	getInstUpgradeTemplate : basePath + '/template/getInstUpgradeTemplate/',
	getTemplateType : basePath + '/template/getTemplateType/',
}


export async function getHistroyTemplate(params){
	return request( apiUrls.getHistroyTemplate, {
      method:'POST',
      body:params
  })
}


// 根据实例id获取可升级模板
export async function getInstUpgradeTemplate(params){
	return request( apiUrls.getInstUpgradeTemplate + params.id , {
      method:'GET',
  })
}


// 根据模板类型和发布类型获取模板list
export async function getTemplateType(params){
	return request( apiUrls.getTemplateType, {
      method:'POST',
      body:params
  })
}
